package com.guiguli.static01;

/**
    练习 完成数组的工具类的设计
 */
public class testDemo2 {
    private testDemo2(){

    }
    public static String toString(int[] arr){
        if(arr==null){
            return null;
        }
        String result="[";
        for (int i = 0; i < arr.length; i++) {
            result+=(i==arr.length-1?arr[i]:arr[i]+",");
        }
        result+="]";
        return result;
    }

}
